<?php
/*
Template Name: Site Map
*/
?>
<?php get_header(' '); ?>
<div id="main" class="clearfix">
	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1 id="page-title"><?php the_title(' '); ?></h1>			
    <?php the_content(' '); ?>
    <?php endwhile; ?>
    <?php endif; ?>	
    <div id="site-map-wrap" class="clearfix">
        <div class="site-map-column">
            <h2>Pages</h2>
            <ul>
            	<?php wp_list_pages( 'title_li=' ); ?>
            </ul>
        </div>
    	<!-- END site-map-column -->
        <div class="site-map-column">
        <h2>Categories</h2>
            <ul>
            	<?php wp_list_categories( 'title_li=' ); ?>
            </ul>
        </div>
    	<!-- END site-map-column -->
        <div class="site-map-column remove-margin">
        <h2>Tags</h2>
        	<ul>
				<?php
                $tags = get_tags();
                foreach ($tags as $tag){
                $tag_link = get_tag_link($tag->term_id);
                $html .= "<li><a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>";
                $html .= "{$tag->name}</a></li>";
                }
                echo $html;
                ?>
            </ul>
        </div>
        <!-- END site-map-column -->
    <div class="clear"></div>
    </div>
    <!-- END site-map-wrap -->
<?php get_footer(' '); ?>